package com.wgo.surveyModel.domain.server.ejb;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.wgo.surveyModel.domain.common.Streamer;
import com.wgo.surveyModel.domain.common.SurveyDef;
import com.wgo.surveyModel.domain.common.impl.VesselImpl;

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class VesselEjb extends VesselImpl
{
     	
    @Override	
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
  	public Long getDbId() 
	{
		return super.getDbId();
	} 

	@Override
	public String getSerialNumber ()
	{
		return super.getSerialNumber();
	}

	@Override
	public Integer getProdYear ()
	{
		return super.getProdYear();
	}

	@Override
	public String getName ()
	{
		return super.getName();
	}

	@Override
	public Float getWeight ()
	{
		return super.getWeight();
	}

	@Override
	@OneToMany(mappedBy = "vessel", targetEntity = StreamerEjb.class, cascade = {CascadeType.ALL })	
	public Set<Streamer> getStreamers ()
	{
		return super.getStreamers();
	}
  
	@Override
	@ManyToOne(targetEntity = SurveyDefEjb.class)      
    public SurveyDef getSurveydef()
	{
		return super.getSurveydef();
	}
  
}
